﻿using System;

namespace MiniAspNetCore
{
    /// <summary>
    /// web宿主构建者
    /// </summary>
    public interface IWebHostBuider
    {
        /// <summary>
        /// 使用什么服务器
        /// </summary>
        /// <param name="server"></param>
        /// <returns></returns>
        IWebHostBuider UseServer(IServer server);

        /// <summary>
        /// 配置管道
        /// </summary>
        /// <param name="config"></param>
        /// <returns></returns>
        IWebHostBuider Config(Action<IApplicationBuilder> config);

        /// <summary>
        /// 构建服务宿主
        /// </summary>
        /// <returns></returns>
        IWebHost Build();
    }
}
